package cn.getech.data.development.config;

import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

@Configuration
public class ConfigBean {
    //    @Bean
//    public RestTemplate getRestTemplate(){
//        return  new RestTemplate(new HttpComponentsClientHttpRequestFactory());
//    }
    @Bean
    public RestTemplate restTemplate(RestTemplateBuilder restTemplateBuilder) {
        return restTemplateBuilder.setConnectTimeout(30000).setReadTimeout(30000).build();
    }
}
